package com.eshopkeeper.dao.user;

import java.util.List;
import java.util.Map;

import com.eshopkeeper.core.base.BaseMapper;
import com.eshopkeeper.model.user.UserInfo;
import com.eshopkeeper.model.user.UserInfoBean;
import com.eshopkeeper.model.user.UserProInfoBean;

/**
 * Created by HuangYL on 17-4-24.
 */
public interface UserInfoMapper extends BaseMapper<UserInfo> {

	UserInfo getUserById(Long id) throws Exception;

	int phoneIsExisted(String mobile);

	UserInfo getUserByParm(Map<String, Object> map);

	void insertUser(UserInfo user);

	UserInfoBean getAdvertiserInfo(Long userSlaveId);

	UserInfoBean getSupplierInfo(Long userSlaveId);

	void updateLastLoginTimeAndIp(Map<String, Object> map);
    
    public Integer changeExtractPassword(Map<String, Object> map) throws Exception;
    
    List<UserProInfoBean> getSubAccList(Long userId);

	List<UserInfo> selectUserList(List<Long> ids);

	int updateLogout(Map<String, Object> queryMap);

	UserProInfoBean getUserAdsInfo(Map<String, Object> queryMap);

	UserProInfoBean getUserSupInfo(Map<String, Object> queryMap);

	String isApplyBizRole(Long userId);
	
	Long getUseIdM(Map<String,Object> map) throws Exception;

    Integer updatePassword(Map<String, Object> params);

	int getUserByIdandPassword(Map<String, Object> params);

	void updateLoginErrorTime(String mobile);

	List<Long> selectAdsIdByUserName(Map<String, Object> params);

	List<Long> selectSulIdByUserName(Map<String, Object> params);

    UserInfoBean getadsUserInfobyParam(Map<String, Object> params);

	UserInfoBean getsulUserInfobyParam(Map<String, Object> params);

    List<Map<String,String>> selSupplyList() throws Exception;

    String getCompanyName(String userId);

	/**
	 * 根据手机号修改登录密码
	 * @param map
	 * @return
	 * @throws Exception
	 */
	int updatePassByPhone(Map<String,Object> map) throws Exception;

	/**
	 * Query zzy advertiser id string.
	 * 通过广告主id查询智子云广告主id
	 * @param paramMap the param map
	 * @return the string
	 */

	String queryZzyAdvertiserId(Map<String, Object> paramMap);
	
}
